#ifndef _FIG_SFX_MANAGER_H_
#define _FIG_SFX_MANAGER_H_


#include "fig_sfx.h"
#include "fig_sounds.h"

#include "ui/ui_manager.h"

class FIGSFXCollection;



class FIGSFXManager
{

public:
	
	static FIGSFXManager&			Instance();
	


	

	void								RenderAtGround(const math::Vec2& Offset,float Scale);
	void								Render(const math::Vec2& Offset,float Scale);
										// After UI
	void								PostRender(const math::Vec2& Offset,float Scale);
	void								RenderDebug(const math::Vec2& Offset,float Scale);
	void								Tick(float dt);


	void								Clear();
	FIGSfx*								Spawn(
											FIGSfx::SFX_TYPES Type, 
											const math::Vec2& Pos,
											float SizeScale,
											float Rotation = 0,
											bool	bIsChache = false,
											FIGSounds::SOUND_NAMES SoundSFXName = FIGSounds::SFX_NONE
											
											);

	FIGSfx*								GetCacheSfx(FIGSfx::SFX_TYPES Type);
	void								Cache();
	
protected:

	

	FIGSFXManager();
	~FIGSFXManager();
	
	std::vector<FIGSFXCollection*>		m_SFXCollections;

	std::vector<FIGSfx*>				m_CacheSfxs;	

};

#endif